package com.coolbi.onsupai.core.dao;

import com.coolbi.onsupai.core.entity.Customer;

/**
 * @Description Customer DAO Customer数据访问接口
 * @author for2cold
 * @codeDate 2012-6-19 上午10:38:20
 *
 */
public interface CustomerDao extends BaseDao<Customer> {

	/**检测手机号码是否已被注册*/
	public int countByTel(String tel);
	
	/**检测电子邮箱是否已被注册*/
	public int countByEmail(String email);
	
	/**检测客户昵称是否已被注册*/
	public int countByUserName(String userName);
	
	/**检测QQ号码是否已被注册*/
	public int countByQQNumber(String qqNumber);
	
	/**
	 * 修改客户交易信息
	 * @param id 客户ID
	 * @param creditNum 积分
	 * @return
	 */
	public int updateTrade(Long id, int creditNum);
}
